#include <iostream>

using namespace std;

template <class T1, class T2>
void foo(T1 a, T2 b)
{
        cout << "a = " << a << ", b = " << b << endl;
}

template <class T>
T add(T a, T b)
{
        return a + b;
}

int main()
{
        int a;
        double d;

        a = add(3, 5);
        d = add(3.14, 5.6);

        foo(a, d);

        return 0;
}
